home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-12-08 | 42.5 KB | 1,176 lines | [TEXT/R*ch] |
- C.S.M.P. Digest Fri, 05 Jun 92 Volume 1 : Issue 104
-
- Today's Topics:
-
- MacApp: documentation on ViewEdit
- Is it possible to turn the monitor off & on from software?
- (Urgent) Redirection with THINK Pascal
- File Manager Blues
- CTB Examples in C?
- PD online references ?
- IIfx ROM not 32 bit clean
- Learn c on the mac
- Hack to autocomment in Think C 5.0???
- Q: Flip-wipe from one PICT to another
- Repost: How to get Superdrive into MFM mode?
- How can we "emulate" the Finder...?
-
-
- The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
-
- These digests are available (by using FTP, account anonymous, your email
- address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
- edu. This is also the home of the comp.sys.mac.programmer Frequently Asked
- Questions list. The last several issues of the digest are available from
- sumex-aim.stanford.edu as well.
-
- These digests are also available via email. Just send a note saying that you
- want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
- automatically receive each new digest as it is created.
-
- The digest is a collection of articles from the internet newsgroup comp.sys.
- mac.programmer. It is designed for people who read c.s.m.p. semi-regularly
- and want an archive of the discussions. If you don't know what a newsgroup
- is, you probably don't have access to it. Ask your systems administrator(s)
- for details. (This means you can't post questions to the digest.)
-
- The articles in these digests are taken directly from comp.sys.mac.programmer.
- They are not edited; all articles included in this digest are in their original
- posted form. The only articles that are -not- included in these digests are
- those which didn't receive any replies (except those that give information
- rather than ask a question). All replies to each article are concatenated
- onto the original article in the order in which they were received. Article
- threads are not added to the digests until the last article added to the
- thread is at least one month old (this is to ensure that the thread is dead
- before adding it to the digests).
-
- Send administrative mail to mkelly@cs.uoregon.edu.
-
- -------------------------------------------------------
-
- From: speck@dat.ruc.dk (Peter Speck)
- Subject: MacApp: documentation on ViewEdit
- Date: 22 Apr 92 17:57:08 GMT
- Organization: Roskilde UniversitetsCenter
-
- I cannot find any documentation on how
- to edit custion views in ViewEdit
- (for MacApp3.0).
- a) Eg. I have a class TSpecialEditText that
- doesn't have anything i the 'View' rsrc besides
- from the TEditText stuff
- b) I have addition stuff, want to specify it
- like TMPL in ResEdit or XCMDs.
-
- Thanks,
- Peter Speck
-
- +++++++++++++++++++++++++++
-
- From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
- Organization: University of Illinois at Urbana
- Date: Wed, 22 Apr 1992 20:16:47 GMT
-
- speck@dat.ruc.dk (Peter Speck) writes:
-
- >I cannot find any documentation on how
- >to edit custion views in ViewEdit
- >(for MacApp3.0).
- >a) Eg. I have a class TSpecialEditText that
- >doesn't have anything i the 'View' rsrc besides
- >from the TEditText stuff
-
- >b) I have addition stuff, want to specify it
- >like TMPL in ResEdit or XCMDs.
-
- Well, all subclasses will have extra fields. The question is, do you want to
- read them in from the view resource (like the standard views do), or read them
- in and call explicit init routines in your code?
-
- For "a", just do the usual trick of replacing the class name in ViewEdit with
- your subclasses name.
-
- For "b"... ViewEdit 1.0 doesn't support writing out additional information. You
- can use Rez to write views, but it would mean diving into the rather kludgy way
- MacApp handles views (since Rez doesn't support subclassing), and Text-based
- views are pretty hard to rearrange. For MacApp 3.0/ViewEdit 3.0, you are given
- a single 4 byte space at the end of every view. At the moment I believe it's
- interpreted as a long, so you can stick a resource id in there or something.
- It's referenced as fUserBytes.
- - --
- Mark Lanett, Software Tools Group, NCSA; mlanett@uiuc.edu; NCSA.STG (AppleLink)
-
- +++++++++++++++++++++++++++
-
- From: Bruce.Hoult@bbs.actrix.gen.nz
- Organization: Actrix Information Exchange
- Date: Sun, 26 Apr 1992 04:56:28 GMT
-
- In article <mlanett.703973807@void> mlanett@void.ncsa.uiuc.edu (Mark Lanett) writes:
- >
- > For "b"... ViewEdit 1.0 doesn't support writing out additional information. You
- > can use Rez to write views, but it would mean diving into the rather kludgy way
- > MacApp handles views (since Rez doesn't support subclassing), and Text-based
- > views are pretty hard to rearrange. For MacApp 3.0/ViewEdit 3.0, you are given
- > a single 4 byte space at the end of every view. At the moment I believe it's
- > interpreted as a long, so you can stick a resource id in there or something.
- > It's referenced as fUserBytes.
-
- ViewEdit is just *crying* out to get user-defined view types via the
- new "Dinker" facility. It would probably take less than a day to do
- it and if Apple don't have someone working on it they darned well should,
- IMNSHO.
- - --
- Bruce.Hoult@bbs.actrix.gen.nz Twisted pair: +64 4 477 2116
- BIX: brucehoult Last Resort: PO Box 4145 Wellington, NZ
- "Cray's producing a 200 MIPS personal computer with 64MB RAM and a 1 GB
- hard disk that fits in your pocket!" "Great! Is it PC compatable?"
-
- +++++++++++++++++++++++++++
-
- From: ksand@apple.com (Kent Sandvik)
- Date: 4 May 92 23:24:52 GMT
- Organization: MacDTS Mongols
-
- In article <1992Apr26.045628.29705@actrix.gen.nz>, Bruce.Hoult@bbs.actrix.gen.nz
- writes:
- >
- > In article <mlanett.703973807@void> mlanett@void.ncsa.uiuc.edu (Mark Lanett)
- writes:
- > >
- > > For "b"... ViewEdit 1.0 doesn't support writing out additional information.
- You
- > > can use Rez to write views, but it would mean diving into the rather kludgy
- way
- > > MacApp handles views (since Rez doesn't support subclassing), and Text-based
- > > views are pretty hard to rearrange. For MacApp 3.0/ViewEdit 3.0, you are
- given
- > > a single 4 byte space at the end of every view. At the moment I believe it's
- > > interpreted as a long, so you can stick a resource id in there or something.
- > > It's referenced as fUserBytes.
- >
- > ViewEdit is just *crying* out to get user-defined view types via the
- > new "Dinker" facility. It would probably take less than a day to do
- > it and if Apple don't have someone working on it they darned well should,
- > IMNSHO.
-
- About ViewEdit, Dinker and so on, the World Wide Developer's Conference
- will have a couple of announcements about this all. Sorry, can't say anything
- until it's officially sanctioned.
-
- Cheers,
- Kent Sandvik
- certainly not speaking for Apple just now!
-
-
- ---------------------------
-
- From: mkelly@mystix.cs.uoregon.edu (Michael A. Kelly)
- Subject: Is it possible to turn the monitor off & on from software?
- Organization: University of Oregon Computer and Information Sciences Dept.
- Date: Thu, 23 Apr 1992 20:08:52 GMT
-
-
- The subject line says it all. What do you think?
-
- Mike.
- - --
- _____________________________________________________________________________
- Michael A. Kelly University of Oregon
- mkelly@cs.uoregon.edu Computer Science Department
- _____________________________________________________________________________
-
- +++++++++++++++++++++++++++
-
- From: stevec@Apple.COM (Steve Christensen)
- Date: 5 May 92 01:32:59 GMT
- Organization: Apple Computer Inc., Cupertino, CA
-
- mkelly@mystix.cs.uoregon.edu (Michael A. Kelly) writes:
-
- >The subject line says it all. What do you think?
-
- Well, actually it may not. Do you mean, "can you turn the monitor power
- on/off?" or "can you add/remove the part of the desktop associated with
- a particular monitor?"? Two vastly different things. For the first case,
- the answer is generally 'no' because most (all?) monitors have a physical
- power switch that can't be controlled by software.
-
- For the second case, the answer is 'yes'...although you have great potential
- to make lots and lots of apps crash, especially in the case of removing part
- of the desktop. Adding monitors to the desktop dynamically takes a bit of
- work to do correctly, but I don't know what apps won't work correctly when
- that happens...
-
- steve
-
- - --
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Steve Christensen Never hit a man with glasses.
- stevec@apple.com Hit him with a baseball bat.
-
- ---------------------------
-
- From: gt5870c@prism.gatech.EDU (007)
- Subject: (Urgent) Redirection with THINK Pascal
- Date: 2 May 92 21:35:29 GMT
- Organization: Universal Exports
-
-
- Is there any way to redirect a text file as standard input similar to Unix's
- ProgName < TestData type redirection? Also how can I give the text window an
- EOF?
-
- I am using THINK Pascal 3.0.2
-
- Thanks in advance.
-
- -Noah
-
- +++++++++++++++++++++++++++
-
- From: edw@caligula.cts.com (Ed Watkeys)
- Date: Sat, 2 May 92 23:26:56 EDT
- Organization: Distant Software
-
-
- In article <56402@hydra.gatech.EDU> (comp.sys.mac.programmer), gt5870c@prism.gatech.EDU (007) writes:
- >
- > Is there any way to redirect a text file as standard input similar to Unix's
- > ProgName < TestData type redirection? Also how can I give the text window an
- > EOF?
- >
- > I am using THINK Pascal 3.0.2
- >
- > Thanks in advance.
- >
- > -Noah
- >
- Go to the "Run Options..." or similar in the Run menu -- it allows you
- to send standard output to a file or the printer.
-
- Your other problem was solved by running this program and experimenting...
-
- program eoftest
- var s : string;
- begin
- readln (s);
- readln (s);
- end.
-
- I ran it and hit common eof characters (^D, ^Z, ^C). ^C causes an "unexpected
- eof" error to occur -- it stops the first readln, as eof should, and bombs
- the second.
-
- Ed
-
- - --
- Ed Watkeys (Drexel U. Comp Sci) "Moral judgement and condemnation is
- edw@caligula.cts.com the favorite form of revenge for the
- edw%caligula@phlpa.pha.pa.us spiritually limited on those who are
- ls.com!phlpa!caligula!edw less so...." -- Friedrich Nietzsche
-
- +++++++++++++++++++++++++++
-
- From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
- Date: 3 May 92 23:16:21 GMT
- Organization: Symantec Corp.
-
- >>>>> On Sat, 2 May 92 23:26:56 EDT, edw@caligula.cts.com (Ed Watkeys) said:
-
- > I ran it and hit common eof characters (^D, ^Z, ^C). ^C causes an
- > "unexpected eof" error to occur -- it stops the first readln, as
- > eof should, and bombs the second.
-
- Try using the Enter key on the keypad, this signals an EOF in the
- correct fashion. I believe that the reason for this is that the
- charCode for the Enter key is 0x03, which is the same as Control-D and
- which is used to signal an EOF on UNIX systems.
-
- -phil
- - --
- Phil Shapiro Software Engineer
- Language Products Group Symantec Corporation
- Internet: phils@cs.brandeis.edu
-
- +++++++++++++++++++++++++++
-
- From: neeri@iis.ethz.ch (Matthias Neeracher)
- Organization: Integrated Systems Laboratory, ETH, Zurich
- Date: Mon, 4 May 1992 10:04:07 GMT
-
- In article <PHILS.92May3181621@chaos.cs.brandeis.edu> phils@chaos.cs.brandeis.edu (Phil Shapiro) writes:
- >>>>>> On Sat, 2 May 92 23:26:56 EDT, edw@caligula.cts.com (Ed Watkeys) said:
- >
- > > I ran it and hit common eof characters (^D, ^Z, ^C). ^C causes an
- > > "unexpected eof" error to occur -- it stops the first readln, as
- > > eof should, and bombs the second.
- >
- >Try using the Enter key on the keypad, this signals an EOF in the
- >correct fashion.
-
- Probably correct...
-
- >I believe that the reason for this is that the
- >charCode for the Enter key is 0x03, which is the same as Control-D and
- >which is used to signal an EOF on UNIX systems.
-
- ... but this explanation is incorrect. Control-D is 0x04.
-
- Matthias
-
- - -----
- Matthias Neeracher neeri@iis.ethz.ch
- "You must have picked up that copy of Scarlett instead of Inside Mac
- when you tried to find the right call..." -- Keith Rollin
-
- ---------------------------
-
- From: heddle@clas01.cebaf.gov (David Heddle)
- Subject: File Manager Blues
- Organization: CEBAF (Continuous Electron Beam Accelerator Facility)
- Date: Sun, 3 May 1992 00:34:24 GMT
-
- Dear Friends:
-
- Apologies for what must be a set of FAQs. However, I am stuggling to understand
- the file manager. Here are my questions:
-
- 1) What is the definition of a "working" directory? Is it equivalent to
- what "pwd" would
- give me in Unix or what "SHOW DEFAULT" would give me in VMS?
-
- 2) Assuming that the working directory is as implied by an affirmative
- response to
- the previous question, what does it mean to "create" (or is it
- "open", I don't have
- IM IV at hand) a working directory? Is that equivalant to "cd" (unix)
- or "SET DEFAULT"
- VMS? If so, what about the previous Working Directory?? Is there only
- one at a time?
-
- Questions 3-5 are practical in nature:
-
- 3) How do I get an ID for the present Working Directory? The things that
- I have tried
- seem to give me only the ID of the root (i.e. the hard disk )
-
- 4) How do I get the names (partial path) of all the files and folders
- (but no their
- contents -- i.e. just the folder names) of the present working
- directory?
-
- 5) How can I find the ID of the parent and the IDs of the offspring of the
- present working directory?
-
-
- Any help is greatly appreciated! The real bottom line is that, while iI
- have no doubt
- that the fault is mine, I cannot feel comfortable with the File Manager
- chapter
- in IM IV.
-
- dph
-
- +++++++++++++++++++++++++++
-
- From: dougm@cns.caltech.edu (Doug McNaught)
- Date: 3 May 92 06:20:25 GMT
- Organization: California Institute of Technology
-
- In article <1992May3.003424.7923@murdoch.acc.Virginia.EDU> heddle@clas01.cebaf.gov (David Heddle) writes:
-
-
- Dear Friends
-
- Apologies for what must be a set of FAQs. However, I am stuggling to understand
- the file manager. Here are my questions:
-
- 1) What is the definition of a "working" directory? Is it equivalent to
- what "pwd" would
- give me in Unix or what "SHOW DEFAULT" would give me in VMS?
-
- Working directories are a hack for backward compatibility with non-HFS
- aware programs. They're still around because the pre-system 7 Standard
- File Package creates them when a file is selected.
-
- 2) Assuming that the working directory is as implied by an affirmative
- response to
- the previous question, what does it mean to "create" (or is it
- "open", I don't have
- IM IV at hand) a working directory? Is that equivalant to "cd" (unix)
- or "SET DEFAULT"
- VMS? If so, what about the previous Working Directory?? Is there only
- one at a time?
-
- There's no reason to open a WD yourself. The way backward
- compatibility is maintained is that WD reference numbers can always be
- used in place of volume reference numbers in the old File Manager
- calls. So, when the user chooses a file with SFGetFile, the SF
- package creates a WD and passes its refNum back to your program, which
- can use it just like a vRefNum. There really isn't a Unix-style cwd
- since all the File Manager calls to create, open, and stat files take
- a name and a v(WD)RefNum.
-
- Questions 3-5 are practical in nature:
-
- 3) How do I get an ID for the present Working Directory? The things that
- I have tried
- seem to give me only the ID of the root (i.e. the hard disk )
-
- What have you tried? By ID do you mean a WDRefNum or a dirID (they're
- two different things). Again, there isn't really a cwd in the Unix
- sense. If you want to find out the directory that your app started
- from, that can be done--I think (not sure) that GetVol at startup will
- return a WDRefNum for you.
-
- 4) How do I get the names (partial path) of all the files and folders
- (but no their
- contents -- i.e. just the folder names) of the present working
- directory?
-
- There are two ways. The simplest conceptually is to call PBGetCatInfo
- on your working directory using the ioFDirIndex field of the
- CInfoPBRec, after first getting the 'valence' of the directory itself
- with another call to PBGetCatInfo. The indexing calls will return info
- about each object in the directory, including whether it's a file or a
- directory, the size (for files), creation and modification dates, etc.
- It'll also return the name of the object (file or directory).
-
- 5) How can I find the ID of the parent and the IDs of the offspring of the
- present working directory?
-
- PBGetCatInfo again.
-
- Any help is greatly appreciated! The real bottom line is that, while iI
- have no doubt
- that the fault is mine, I cannot feel comfortable with the File Manager
- chapter
- in IM IV.
-
- That chapter is a bear! I've struggled with this stuff recently, so
- mail me if you have questions or want sample code. I decided to go
- ahead and post instead of mailing you because this is something that a
- lot of people have trouble with. Other good references are the FAQ
- list available by ftp from ftp.cs.uoregon.edu, and the Usenet Mac
- Programmer's Guide, available at Sumex, as well as the excellent
- sample code and TechNotes at ftp.apple.com.
-
- - -doug
- - --
- Doug McNaught |"Sadder still to watch it die/ Then never to have
- dougm@cns.caltech.edu | known it/ For you, the blind who once could see/
- mcnaught@midget.towson.edu | The bell tolls for thee..." --Neil Peart
- Nobody approves my opinions! Not even me, sometimes. Read at your own risk.
-
- +++++++++++++++++++++++++++
-
- From: russotto@eng.umd.edu (Matthew T. Russotto)
- Date: Mon, 04 May 92 14:23:54 GMT
- Organization: College of Engineering, University of Maryland, College Park
-
- In article <1992May3.003424.7923@murdoch.acc.Virginia.EDU> heddle@clas01.cebaf.gov (David Heddle) writes:
- >Dear Friends:
- >
- >Apologies for what must be a set of FAQs. However, I am stuggling to understand
- >the file manager. Here are my questions:
- >
- >1) What is the definition of a "working" directory? Is it equivalent to
- >what "pwd" would
- > give me in Unix or what "SHOW DEFAULT" would give me in VMS?
-
- No-- a 'working directory' is a structure which looks like a separate
- volume to old file manager calls. It is there to allow compatibility
- between MFS (flat file directory) and HFS
-
- >Questions 3-5 are practical in nature:
- >
- >3) How do I get an ID for the present Working Directory? The things that
- >I have tried
- > seem to give me only the ID of the root (i.e. the hard disk )
-
- HGetVol will get you the reference number of the current volume, plus
- the directory ID of the current directory. That is enough to fully
- specify the current directory
-
- >4) How do I get the names (partial path) of all the files and folders
- >(but no their
- > contents -- i.e. just the folder names) of the present working
- >directory?
-
- Use GetCatInfo in indexed mode. Set DirID and vRefNum to 0 to use the
- default directory.
-
- >
- >5) How can I find the ID of the parent and the IDs of the offspring of the
- > present working directory?
-
- GetCatInfo again.
-
-
- - --
- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu
- Some news readers expect "Disclaimer:" here.
- Just say NO to police searches and seizures. Make them use force.
- (not responsible for bodily harm resulting from following above advice)
-
- ---------------------------
-
- From: rhessjr@west.darkside.com (Robert Hess)
- Subject: CTB Examples in C?
- Date: 1 May 92 00:02:22 GMT
- Organization: Independent Consultant
-
- Anyone know where I can find some CTB examples written in C? I looked on
- ftp.apple.com and found a couple of things but I'd like more. MUCH more.
-
- I can't ftp, so if someone could send stuff to me I'd really appreciate it.
-
- Robert Hess
- AppleLink:ENDPOINT
- AOL:RHessJr
- CIS:71641,1376
-
- +++++++++++++++++++++++++++
-
- From: mspace@netcom.com (Brian Hall)
- Date: 1 May 92 02:28:43 GMT
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
-
- rhessjr@west.darkside.com (Robert Hess) writes:
-
- >Anyone know where I can find some CTB examples written in C? I looked on
- >ftp.apple.com and found a couple of things but I'd like more. MUCH more.
-
- >I can't ftp, so if someone could send stuff to me I'd really appreciate it.
-
- >Robert Hess
- >AppleLink:ENDPOINT
- >AOL:RHessJr
- >CIS:71641,1376
-
- APDA sells some examples, and if you *really* want to spend some money,
- it is possible to license the source to MacTerminal for some thousands
- of dollars - contact SW.LICENSING on AppleLink for more info on that.
-
- - --
-
- \ | / | Brian Hall mspace@netcom.com
- - : - | Mark/Space Softworks Applelink: markspace
- /|\ | America Online: MarkSpace
- |-+-| |
- /-\|/-\ | People don't kill people, toasters kill people.
-
- +++++++++++++++++++++++++++
-
- From: paul@cthq.UUCP (Paul G. Smith)
- Date: 1 May 92 19:03:49 GMT
- Organization: CommsTalk HQ
-
-
- In article <3j-k=wh.mspace@netcom.com> (comp.sys.mac.programmer), mspace@netcom.com (Brian Hall) writes:
- > APDA sells some examples, and if you *really* want to spend some money,
- > it is possible to license the source to MacTerminal for some thousands
- > of dollars - contact SW.LICENSING on AppleLink for more info on that.
- >
-
- Yes, but... the source code examples APDA sells are written in Pascal. The
- source to MacTerminal 3 is in Pascal too - MacTerminal 3 is based on MacApp
- 2.0 and all the source code is Object Pascal.
-
- One small C example is within SuperSurfer, a modified version of the APDA-
- distributed CTB example program. Unfortunately, only a few small bits (mostly
- the parts dealing with the terminal window scrollback area) are written
- in C: the remainder is a hacked copy of the original Pascal program.
-
- You might try to look for the 'Sessions' demo, one of the System 7 example
- projects (James Beninghaus of Mac DTS was the author, I think). It is on
- some of the Developer CDs, and may be on Apple's FTP server. This was (if
- I remember right - I've not looked at it for a long time) written in C++.
-
- best regards, Paul
-
- - -------------------------------------
- Paul G Smith / CommsTalk HQ
- INTERNET: "paul@cthq.uucp" CIX: "pgsmith"
- AppleLink: "commstalk.hq" ("commstalk.hq@applelink.apple.com")
- tel/fax: + 44 491 574295 (dial 11 on 2nd dial tone for fax)
- snail: 40 St Marks Road, Henley-on-Thames, Oxon. RG9 1LW. UK
-
- +++++++++++++++++++++++++++
-
- From: peterc@moebius.cubetech.com (Peter Creath)
- Date: 3 May 92 23:03:44 GMT
- Organization: Cube Technologies
-
-
- In article <D2150057.2ekkod@cthq.UUCP> (comp.sys.mac.programmer), paul@cthq.UUCP (Paul G. Smith) writes:
- > In article <3j-k=wh.mspace@netcom.com> (comp.sys.mac.programmer), mspace@netcom.com (Brian Hall) writes:
- > > APDA sells some examples, and if you *really* want to spend some money,
- > > it is possible to license the source to MacTerminal for some thousands
- > > of dollars - contact SW.LICENSING on AppleLink for more info on that.
- >
- > One small C example is within SuperSurfer, a modified version of the APDA-
- > distributed CTB example program. Unfortunately, only a few small bits (mostly
- > the parts dealing with the terminal window scrollback area) are written
- > in C: the remainder is a hacked copy of the original Pascal program.
-
- Also, Terminal 2.0 and 2.2 (both written in C and distributed with
- source code) are able to utilize the Comm Toolbox. They should be
- up on sumex.
-
- - ----------------------------------------------------------------------------
- Peter Creath "When I was a boy I was told that anybody could
- peterc@moebius.cubetech.com become president; I'm beginning to believe it."
- -- Clarence Darrow
-
- +++++++++++++++++++++++++++
-
- From: jess@gn.ecn.purdue.edu (Jess M Holle)
- Date: 4 May 92 23:45:42 GMT
- Organization: Purdue University Engineering Computer Network
-
- I may have missed someone mentioning this, but are there any freely
- available (via ftp) sample programs written in C that use the
- terminal manager portion of the CTB?
-
- Thanks,
- Jess Holle
-
- ---------------------------
-
- From: mrichard@watserv1.waterloo.edu (Mark P. Richards)
- Subject: PD online references ?
- Date: 4 May 92 15:27:39 GMT
- Organization: University of Waterloo
-
- I am aware of two online reference programmes for the ToolBox:
- Think C Reference, and Online Companion. Does anyone know about
- a public domain online reference programme ? And if not, which
- of these two is the best ?
-
- +++++++++++++++++++++++++++
-
- From: leonardr@ccs.itd.umich.edu
- Date: 4 May 92 16:29:56 GMT
- Organization: Campus Computing Sites, University of Michigan-Ann Arbor
-
- In article <1992May4.152739.26447@watserv1.waterloo.edu> mrichard@watserv1.waterloo.edu (Mark P. Richards) writes:
- >I am aware of two online reference programmes for the ToolBox:
- >Think C Reference, and Online Companion. Does anyone know about
- >a public domain online reference programme ? And if not, which
- >of these two is the best ?
- >
- Apple provides as a set of Hypercard stacks called "Spinside Mac"
- which offer "online" reference to all of Inside Mac volumes I-VI. If you
- don't mind giving up the disk space & memory that these require, they work
- pretty well.
-
- I, on the other hand, prefer using the other tools you mentioned
- along with 411 (when I'm in MPW). Programmer's Online Companion is GREAT
- since usually I just need a parameter list to a call (that's all you get,
- along with structs, etc.). If I need more information, then I turn to
- Think Reference to see if I can find whgat I need there - also VERY useful
- on my PowerBook when I'm on a plane.
-
- Just my opinion....
-
-
- - --
- - -----------------------------------------------------------------------
- Leonard Rosenthol Internet: leonardr@ccs.itd.umich.edu
- Director of Advanced Technology AppleLink: MACgician
- Aladdin Systems, inc. GEnie: MACgician
-
- ---------------------------
-
- From: Henry_Van_Tunen@mindlink.bc.ca (Henry Van Tunen)
- Subject: IIfx ROM not 32 bit clean
- Date: 1 May 92 00:50:09 GMT
- Organization: MIND LINK! - British Columbia, Canada
-
- While testing my app, a bus error occurred when I tried to use the contents of
- the low memory global "CurActivate". The value stored there looked like it had
- the high bit set. Using MacsBug, I step spied that location and "discovered"
- the following code in the Macintosh IIfx ROM:
-
- Disassembling from 40815C54 (Macintosh IIfx ROM)
- _TickCount
- +025E 40815C5C LSR.W #$1,D0
- +0260 40815C5E BCC.S _TickCount+0270
- +0262 40815C60 BSET #$07,CurActivate <<< ouch!
- +0268 40815C66 MOVEQ #$FF,D1
- +026A 40815C68 RTS
-
- As you can see, at address $40815C60, it is setting the high bit of
- CurActivate! My guess is the Window Manager is using this bit as a flag.
-
- This bug only happens when you try to use CurActivate when you are processing
- a suspend/resume event. All other times, the value stored there seems to be
- OK.
-
- I know I shouldn't be mucking with low memory globals so I have modified my
- code accordingly. My concern was that there might be other little "features"
- like this waiting to bite someone.
-
- To summarize, this means the ROMs in the IIfx aren't true 32 bit clean. This
- same problem exists on the IIsi and IIcx (which I believe isn't 32 bit clean
- anyway).
-
- I am running System 7.0 and TuneUp 1.1.1 on a Mac IIfx, 8 Meg RAM
-
- +++++++++++++++++++++++++++
-
- From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
- Date: 1 May 92 17:51:31 +1200
- Organization: University of Waikato, Hamilton, New Zealand
-
- In article <11756@mindlink.bc.ca>, Henry_Van_Tunen@mindlink.bc.ca (Henry Van Tunen) writes:
- > +0262 40815C60 BSET #$07,CurActivate <<< ouch!
-
- Granted that might not be a 32-bit-clean thing to do, but it is at least
- 31-bit-clean, and I assume that there is code in Get/WaitNextEvent to
- strip off this bit before returning the window address.
-
- I recall some Apple people quoting the maximum addressable memory in
- 32-bit-clean systems as 2GB rather than 4GB. This may be one of the
- reasons. Another reason would be all those applications inadvertently
- using signed instead of unsigned comparisons on block sizes, so as soon
- as one of them runs on a machine with more than 2GB of available memory,
- it's going to fail with a "not enough memory" error!
-
- On the other hand, are you running in 32-bit mode? If not, maybe the Toolbox
- does something different in that situation.
-
- Lawrence
- who knows that, as soon as he reaches the stage where 2GB of memory
- isn't enough, it'll be the end of the 32-bit era.
-
- +++++++++++++++++++++++++++
-
- From: stevec@Apple.COM (Steve Christensen)
- Date: 5 May 92 02:33:55 GMT
- Organization: Apple Computer Inc., Cupertino, CA
-
- Henry_Van_Tunen@mindlink.bc.ca (Henry Van Tunen) writes:
-
- >While testing my app, a bus error occurred when I tried to use the contents of
- >the low memory global "CurActivate". The value stored there looked like it had
- >the high bit set...
- >... My guess is the Window Manager is using this bit as a flag.
-
- >From looking at the source code (which is in the Event Manager, by the way),
- that bit is only being set when an activateEvt for that window has been
- generated, so that WindowPtr is no longer valid nor used by the system.
-
- >To summarize, this means the ROMs in the IIfx aren't true 32 bit clean. This
- >same problem exists on the IIsi and IIcx (which I believe isn't 32 bit clean
- >anyway).
-
- Well, yes and no. This could be a problem if you had a system with more than
- 2GB installed and the window data structure was stored in memory above the
- 2GB mark. In that case the OS would have a problem handling window activations
- and deactivations, but it wouldn't crash. For all other cases it will work
- correctly because the only time that bit is set is when the OS is done with
- that address and will not use it further. For this case, the ROM is "31-bit
- clean", although in general the ROM really is 32-bit clean...
-
- steve
-
- - --
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Steve Christensen Never hit a man with glasses.
- stevec@apple.com Hit him with a baseball bat.
-
- ---------------------------
-
- From: buzman@uuisis.isis.org (georges milette)
- Subject: Learn c on the mac
- Organization: International Shared Information Service (Ottawa)
- Date: Mon, 04 May 92 14:49:29 GMT
-
- Anyone knows the answer on page 140 , exercise 2 and 3 in dave mark's boos
- "learn C on the Macintosh. I've asked this question on many BBS's and
- all I've gotten so far are other codes that gives me prime numbers..I know
- there's even some others later in the book (the disquette is included
- with a demo version of think c called thin c). I'd like the solution to
- THESE EXERCISES, not another alternate prime number code.
- Any answer concerning this one will be greatly appreciated..
- Thanks
-
-
- +++++++++++++++++++++++++++
-
- From: bskendig@light.Princeton.EDU (Brian Kendig)
- Date: 4 May 92 19:23:34 GMT
- Organization: Starfleet Academy, Princeton University
-
- In article <sc99JB1w164w@uuisis.isis.org> buzman@uuisis.isis.org (georges milette) writes:
- >Anyone knows the answer on page 140 , exercise 2 and 3 in dave mark's boos
- >"learn C on the Macintosh.
-
- Well, I don't know the answer, but then again I'm not just anyone. ;)
- Could you post the question here, so I can take a jab at it?
-
- << Brian >>
-
- - --
- | Brian S. Kendig --/\-- Tri bskendig@phoenix.Princeton.EDU, @PUCC
- | Computer Science BSE |/ \| Quad You gave your life to become the person
- | Princeton University /____\ clubs you are right now. Was it worth it?
-
- ---------------------------
-
- From: jonke@kong.gsfc.nasa.gov (Stephen Jonke)
- Subject: Hack to autocomment in Think C 5.0???
- Date: 1 May 92 19:30:45 GMT
- Organization: NASA Goddard Space Flight Center
-
- Is there a hack in existence that gives you a command key (or
- preferably a menu item with a keyboard shortcut) that will
- automatically comment out the selected lines in a source file while
- using Think C 5.0? I seem to recall that Think Pascal had a menu
- item that would do this, but it seems to be missing in Think C.
-
- Even if it were a stupid hack, such that it didn't pay attention to
- see if there were any comments within the selected lines, it would
- still be a useful thing.
-
- PLEASE E-MAIL ALL RESPONSES! EITHER REPLY TO THIS MESSAGE VIA EMAIL,
- OR SEND MAIL TO: jonke@kong.gsfsc.nasa.gov
-
- Steve
-
- +++++++++++++++++++++++++++
-
- From: haynes@mace.cc.purdue.edu (Carl W. Haynes III)
- Date: 1 May 92 23:27:41 GMT
- Organization: Purdue University Computing Center
-
- In article <1992May1.193045.18613@kong.gsfc.nasa.gov> jonke@kong.gsfc.nasa.gov (Stephen Jonke) writes:
- >Is there a hack in existence that gives you a command key (or
- >preferably a menu item with a keyboard shortcut) that will
- >automatically comment out the selected lines in a source file while
- >using Think C 5.0? I seem to recall that Think Pascal had a menu
- >item that would do this, but it seems to be missing in Think C.
-
- PopUpFuncs has a command to let you do this. It is a commercial
- add-on to Think C (and MPW, I think) whose main purpose is to
- provide you with a menu of functions in your unit. (the same idea
- as cmd-clicking the title bar in Think Pascal).
-
- I think it's about $45.00 from
- SciComp Software
- 1-800-522-5939
- 2912 Claremont Ave. #21
- Berkeley, CA 94705
-
- carl
- haynes@mace.cc.purdue.edu
- AOL: CWH3
-
-
- +++++++++++++++++++++++++++
-
- From: Laurie Kirchmeier <laurence.kirchmeier@umich.edu>
- Organization: Office of Instructional Tech./ Univ of Michigan
- Date: Mon, 4 May 92 13:58:04 GMT
-
- CMaster is another commercial extender for THINK-C which does
- autocommenting and
- much much more. It's cost about $80 and is available from
-
- Jersey Scientific
- 545 Eighth Ave
- New York NY 10018
- Tel. 121 736-0406
-
- +++++++++++++++++++++++++++
-
- From: Laurie Kirchmeier <laurence.kirchmeier@umich.edu>
- Organization: Office of Instructional Tech./ Univ of Michigan
- Date: Mon, 4 May 92 13:57:08 GMT
-
- CMaster is another commercial extender for THINK-C which does
- autocommenting and
- much much more. It's cost about $80 and is available from
-
- Jersey Scientific
- 545 Eighth Ave
- New York NY 10018
- Tel. 121 736-0406
-
- ---------------------------
-
- From: felciano@medisg.stanford.edu (Ramon M. Felciano)
- Subject: Q: Flip-wipe from one PICT to another
- Date: 5 May 92 00:00:46 GMT
- Organization: SUMMIT (Stanford Univ. Medical Media and Information
-
-
- Hi!
-
- I'm trying to make an About box that does a wipe transition from one
- color PICT to another. I'd like to do a simple horizontal or vertical
- flip (looks like you're flipping a card over). Does anyone know how to do
- this, or know where I might find some sample code?
-
- I know the book "Graphics Gems Vol 1" describes a way to do a fade in,
- but I haven't found anything on this kind of flipping.
-
- Ramon M. Felciano
- Associate Director, SUMMIT
- Stanford University Medical Media and Information Technologies
-
- +++++++++++++++++++++++++++
-
- From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
- Date: 6 May 92 00:54:37 GMT
- Organization: University of Waikato, Hamilton, New Zealand
-
- Can you explain a bit more about the sort of effect you're trying to achieve?
- I can think of three possibilities. Assume the first image is represented
- by "123456789" and the second one by "ABCDEFGHI", which of the following
- four sequences represents the effect you want?
-
- Wipe:
-
- 123456789
- 123456GHI
- 123DEFGHI
- ABCDEFGHI
-
- Scroll on:
-
- 123456789
- 123456ABC
- 123ABCDEF
- ABCDEFGHI
-
- Scroll off:
-
- 123456789
- 456789GHI
- 789DEFGHI
- ABCDEFGHI
-
- Push:
-
- 123456789
- 456789ABC
- 789ABCDEF
- ABCDEFGHI
-
- A sort of "peeling off" effect (Premiere calls this "Roll Away"):
-
- 123456789
- 123987GHI
- 654DEFGHI
- ABCDEFGHI
-
- Actually there are other variations possible (besides the obvious horizontal
- reversals of the above effects), but these five seem the most reasonable ones.
- The first four are pretty easy to do with just a few QuickDraw calls; the last
- one is more work, because it involves flipping the pixels around.
-
- So, which of the six was it you wanted?
-
- Lawrence D'Oliveiro fone: +64-7-856-2889
- Computer Services Dept fax: +64-7-838-4066
- University of Waikato electric mail: ldo@waikato.ac.nz
- Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
- There are two types of people in the world: those who divide people into
- two types, those who don't, and those who can't count.
-
- +++++++++++++++++++++++++++
-
- From: CXT105@psuvm.psu.edu (Christopher Tate)
- Date: 5 May 92 04:10:13 GMT
- Organization: Penn State University
-
- In article <1992May5.000046.1713@leland.Stanford.EDU>,
- felciano@medisg.stanford.edu (Ramon M. Felciano) says:
- >
- >I'm trying to make an About box that does a wipe transition from one
- >color PICT to another. I'd like to do a simple horizontal or vertical
- >flip (looks like you're flipping a card over). Does anyone know how to do
- >this, or know where I might find some sample code?
-
- How 'bout just set up offscreen buffers (GWorlds are your friend!) to
- hold images of each "side" of the card, and then successively CopyBits()
- the image into narrower and narrower rectangles, erasing the outside
- edge as you go?
-
- (Based on the fact that the flat projection of a card seen at a non-
- orthogonal angle looks "compressed" -- you're just getting CopyBits() to
- do your compression for you.)
-
- - -------
- Christopher Tate | Cryptogram #25:
- cxt105@psuvm.psu.edu |
- CXT105@PSUVM.BITNET | "AUBE IBPB CQHA JPGYZMPE NJHAXBZ, SJZG JS
- - ---------------------| IMWFYZK MZG GJKH MZG *VUPYHAXMH MZG AUB HZJI."
- "*" == proper nouns | -- "M VUYWG'H *VUPYHAXMH YZ *IMWBH"
-
- ---------------------------
-
- From: swb1_ltd@uhura.cc.rochester.edu (Steve Berkley)
- Subject: Repost: How to get Superdrive into MFM mode?
- Date: 2 May 92 02:31:40 GMT
- Organization: University of Rochester - Rochester, New York
-
- I got no response in the last couple of weeks so I thought I'd
- repost my question:
-
- I am writing a disk imaging program that reads in IBM/Ensoniq
- diskettes (10 sectors per track). The reads to the sectors are
- accomplished with PBRead, but the diskettes are being read in at
- 8-12 sectors per track, according to apple's floppy scheme.
- I need to know what call or control to use to get the superdrive
- to kick into MFM mode, reading and writing at 10 sectors per track.
- Any information on detection of a Superdrive would be appreciated
- as well. I could not find anything on this in the Apple Tech Notes,
- nor in IM I-V.
-
- - -Steve Berkley
- swb1_ltd@uhura.cc.rochester.edu
-
- +++++++++++++++++++++++++++
-
- From: russotto@eng.umd.edu (Matthew T. Russotto)
- Date: Mon, 04 May 92 14:16:36 GMT
- Organization: College of Engineering, University of Maryland, College Park
-
- In article <1992May2.023140.24799@galileo.cc.rochester.edu> swb1_ltd@uhura.cc.rochester.edu (Steve Berkley) writes:
- >I got no response in the last couple of weeks so I thought I'd
- >repost my question:
- >
- >I am writing a disk imaging program that reads in IBM/Ensoniq
- >diskettes (10 sectors per track). The reads to the sectors are
- >accomplished with PBRead, but the diskettes are being read in at
- >8-12 sectors per track, according to apple's floppy scheme.
- >I need to know what call or control to use to get the superdrive
- >to kick into MFM mode, reading and writing at 10 sectors per track.
- >Any information on detection of a Superdrive would be appreciated
- >as well. I could not find anything on this in the Apple Tech Notes,
- >nor in IM I-V.
-
- Hmm, I thought I responded to this: the tech note "What your .Sony
- drives for you" tells you how to detect a SuperDrive. I don't know
- how to force one to MFM mode, but if you are successfully reading from
- the disk at all you ARE in MFM mode.
-
-
- - --
- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu
- Some news readers expect "Disclaimer:" here.
- Just say NO to police searches and seizures. Make them use force.
- (not responsible for bodily harm resulting from following above advice)
-
- ---------------------------
-
- From: jovanovi@studsys.mscs.mu.edu (Steve Jovanovic)
- Subject: How can we "emulate" the Finder...?
- Date: 27 Apr 92 21:18:19 GMT
- Organization: Marquette University - Department MSCS
-
- Hi Netters,
-
- Does anyone know how the Finder implements iconic views, and
- allows users to drag icons? First, does the Finder use
- GWorlds to keep track of each window's pixMap, so that fast
- scrolling is no problem? Or...does it keep track of the
- position of each individual icon, and uses CopyBits() to
- draw all of the icons in a window?
-
- Related to this is how the Finder can tell when a user has
- clicked on an icon. BitMapInRegion()?
-
- I'm developing a UI for the FilterTop project in which I'd
- like to do some of the same types of things that the Finder
- does, but I'm not sure how best to approach it. I think using
- GWorlds would cause a problem if users are running FT on a 24-
- bit system. Also, speed is an important concern.
-
- Any advice greatly appreciated! I'll summarize all responses.
-
- Thanks for your time :-)
-
- steve
-
-
-
- - --
- +----------------------+---------------------------+--------------------------+
- | Steve Jovanovic | Internet: stevej@ais.org | TopSoft, BABY! |
- | Marquette University +---------------------------+--------------------------+
- | Computer Engineering | Jesus Saves...Gretzky steals...Gretzky scores!!! |
-
- +++++++++++++++++++++++++++
-
- From: mxmora@unix.sri.com (Matthew Xavier Mora)
- Date: 5 May 92 00:14:25 GMT
- Organization: SRI International
-
-
- In article Steve Jovanovic, jovanovi@studsys.mscs.mu.edu writes:
-
- >Does anyone know how the Finder implements iconic views, and
- >allows users to drag icons? First, does the Finder use
- >GWorlds to keep track of each window's pixMap, so that fast
- >scrolling is no problem? Or...does it keep track of the
- >position of each individual icon, and uses CopyBits() to
- >draw all of the icons in a window?
-
- I believe that the finder used to keep track of the icons location
- in the desktop file. It probably still does. I'm sure it does not use any
- offscreens for drawing since that would take up way too much memory.
- In scrolling it probably just does a scroll rect and draws (by
- copybitsing)
- the icons that have moved into view.
-
- >Related to this is how the Finder can tell when a user has
- >clicked on an icon. BitMapInRegion()?
-
- It probably checks the click location with a list of object points. In an
- old
- prototyping program I wrote a long time ago in basic I just kept the
- points
- in an array. When a click happened in the window, I would scan the array
- backwards (because the objects are layered from low to high in the array
- thus the last object brought to the front or newly created would be the
- last
- item in the array) doing a ptinrect test for each object in the array. The
- speed was acceptable in basic so I would imagine would be much better in
- any
- other language. Plus in pascal or c you could use linked lists and such.
- If
- you have a lot of objects you might want to save just a point. If you have
- only a few objects you can keep track of the rect's or Rgn's.
-
- The finder probably uses ptinrgn instead of ptinrect. Check out the
- *.games.programmer groups for articles on "hit" detection. That would
- probably be faster than the "get points/convertbitmaptorgn/ptinrgn" route.
-
-
- - --
-
- - ---------------------------------------------------------------------
- - ------
- |Matthew Mora
- Matt_Mora@QM.sri.com |
- |SRI International
- mxmora@unix.sri.com |
- |"Selling skin, selling god, the numbers look the same on their credit
- card."|
- | "Queensryche - Operation
- Mindcrime" |
-
- - ---------------------------------------------------------------------
- - ------
-
- ---------------------------
-
- End of C.S.M.P. Digest
- **********************
-